package com.hc.fdkgoods.dao;

import com.hc.fdkgoods.vo.vo_4.SummarySumVO;
import org.jooq.impl.DSL;
import org.springframework.stereotype.Repository;

import static com.hc.fdkgoods.db.Tables.SELLER_ON_PREPARE_SKU_LIST;
import static com.hc.fdkgoods.db.Tables.SELLER_TO_PREPARE_SKU_LIST;
import static org.jooq.impl.DSL.sum;


@Repository
public class ToPushSummaryListDao_4 extends BaseDao{


    public SummarySumVO queryToPushSummaryList() {
        SummarySumVO summarySumVO=new SummarySumVO();
        //已推送查询
        summarySumVO.setPushedNum(db.select(sum(SELLER_ON_PREPARE_SKU_LIST.PREPARE_NUM)).from(SELLER_ON_PREPARE_SKU_LIST).fetchAnyInto(Long.class));
        //待推送查询
        summarySumVO.setWaitPushNum(db.select(sum(SELLER_TO_PREPARE_SKU_LIST.SKU_NUM)).from(SELLER_TO_PREPARE_SKU_LIST).fetchAnyInto(Long.class));
        return summarySumVO;

    }
}
